/**
 * Copyright (C) 2013 AirChina
 *
 * @className:com.airchina.wechat.frontend.processor.MainMenuProcessor
 * @description:
 * 
 * @version:v1.0.0 
 * @author:larry
 * 
 * Modification History:
 * NO   Date         Author      Version     Description
 * -----------------------------------------------------------------
 *     2013-10-17     larry       v1.0.0        create
 *
 *
 */
package com.china.api.wechat.processor;

import com.china.api.wechat.processor.main.*;



@ActionPath(path = "/main")
public class MainMenuProcessor extends Processor {
	
	public MainMenuProcessor() {
		ReplyMapping am = new ReplyMapping();
		am.addMapping(1, "百度搜索", "/txt/one");
		am.addMapping(2, "谷歌搜索", "/txt/two");
		am.addMapping(3, "360搜索", "/txt/three");
		am.addMapping(4, "新浪微博", "/txt/four");
		am.addMapping(5, "腾讯微博", "/txt/five");
		am.addMapping(6, "YY语音", "/txt/six");
		am.addMapping(7, "阿里旺旺", "/txt/seven");
		am.addMapping(8, "语音小助手", "/txt/eight");
		
		ReplyMappingRegister.register("main.menu", am);
	}

	@ActionPath(path = "/menu", defaultReplyMappingId = "main.menu")
	public Response menu(String content, Session session) {
		StringBuilder sb = new StringBuilder();
		sb.append(" 你好！itfirst真诚为您服务，请回复以下指令！\n");
		sb.append("【1】百度搜索\n");
		sb.append("【2】谷歌搜索\n");
		sb.append("【3】360搜索\n");
		sb.append("【4】新浪微博\n");
		sb.append("【5】腾讯微博\n");
		sb.append("【6】YY语音\n");
		sb.append("【7】阿里旺旺\n");
		sb.append("【8】语音小助手\n");
		return buildTextResponse(session.getUserId(), sb.toString());
	}

}
